






<div class="x-body">
    <form class="layui-form form_single" id="form" action="{:url()}" method="post">
        <div class="layui-form-item">
            <label for="username" class="layui-form-label">
                <span class="x-red">*</span>标题
            </label>
            <div class="layui-input-block">
                <input type="text" id="username" maxlength="30" onchange="this.value=this.value.substring(0, 30)" onkeydown="this.value=this.value.substring(0, 30)" onkeyup="this.value=this.value.substring(0, 30)"    name="name" required="" lay-verify="required"
                       autocomplete="off"  value="{$info['name']|default=''}" class="layui-input">
            </div>
            <div style="color: red" class="layui-form-mid layui-word-aux">
                （限制30字符）
            </div>
        </div>




                <div class="layui-form-item">
                    <label for="price" class="layui-form-label">
                        金额
                    </label>
                    <div class="layui-input-block">
                        <input type="number" id="price" name="price"
                               autocomplete="off" class="layui-input"  value="{$info['price']|default=0}">
                    </div>
                    <div class="layui-form-mid layui-word-aux">
                        金额
                    </div>
                </div>

        <div class="layui-form-item">
        <label for="logo" class="layui-form-label">
            <span class="x-red">*</span>分类图像图片（165*128）
        </label>
        <div id="logo" class="layui-input-block">
            {assign name="cover_id" value="$info.cover_id|default='0'" /}
            {:widget('file/index', ['name' => 'cover_id', 'value' => $cover_id, 'type' => 'img'])}
        </div>
        <!--<div class="layui-form-mid layui-word-aux">-->
        <!--(请上传单张封面图片)-->
        <!--</div>-->
        </div>
        <div class="layui-form-item">
            <label for="back_cover_id" class="layui-form-label">
                <span class="x-red">*</span>背景图片
            </label>
            <div id="back_cover_id" class="layui-input-block">
                {assign name="back_cover_id" value="$info.back_cover_id|default='0'" /}
                {:widget('file/index', ['name' => 'back_cover_id', 'value' => $back_cover_id, 'type' => 'img'])}
            </div>
            <!--<div class="layui-form-mid layui-word-aux">-->
            <!--(请上传单张封面图片)-->
            <!--</div>-->
        </div>

        <div class="layui-form-item">
            <label for="user_bonus" class="layui-form-label">
                最高分红收益(%)
            </label>
            <div class="layui-input-block">
                <input type="number" id="user_bonus" name="user_bonus"
                       autocomplete="off" class="layui-input"  value="{$info['user_bonus']|default=0}">
            </div>
            <div class="layui-form-mid layui-word-aux">
                最高分红收益(%)
            </div>
        </div>
        <div class="layui-form-item">
            <label for="user_bonus" class="layui-form-label">
                用户分红比例(%)
            </label>
            <div class="layui-input-block">
                <input type="number" id="user_bonus" name="user_bonus"
                       autocomplete="off" class="layui-input"  value="{$info['user_bonus']|default=0}">
            </div>
            <div class="layui-form-mid layui-word-aux">
                用户分红比例(%)
            </div>
        </div>

        <div class="layui-form-item">
            <label for="king_bonus" class="layui-form-label">
                赌王分红比例(%)
            </label>
            <div class="layui-input-block">
                <input type="number" id="king_bonus" name="king_bonus"
                       autocomplete="off" class="layui-input"  value="{$info['king_bonus']|default=0}">
            </div>
            <div class="layui-form-mid layui-word-aux">
                赌王分红比例(%)
            </div>
        </div>
        <div class="layui-form-item">
            <label for="king_bonus" class="layui-form-label">
                止盈率(%)
            </label>
            <div class="layui-input-block">
                <input type="number" id="winning_rate" name="winning_rate"
                       autocomplete="off" class="layui-input"  value="{$info['winning_rate']|default=0}">
            </div>
            <div class="layui-form-mid layui-word-aux">
                止盈率(%)
            </div>
        </div>
        <div class="layui-form-item">
            <label for="king_bonus" class="layui-form-label">
                止损率(%)
            </label>
            <div class="layui-input-block">
                <input type="number" id="stop_loss_rate" name="stop_loss_rate"
                       autocomplete="off" class="layui-input"  value="{$info['stop_loss_rate']|default=0}">
            </div>
            <div class="layui-form-mid layui-word-aux">
                止损率(%)
            </div>
        </div>
        <div class="layui-form-item">
            <label for="king_bonus" class="layui-form-label">
                最低众筹总额
            </label>
            <div class="layui-input-block">
                <input type="number" id="financing_total" name="superior_money"
                       autocomplete="off" class="layui-input"  value="{$info['financing_total']|default=0}">
            </div>
            <div class="layui-form-mid layui-word-aux">
                最低众筹总额
            </div>
        </div>
        <div class="layui-form-item">
            <label for="king_bonus" class="layui-form-label">
                委托上限金额
            </label>
            <div class="layui-input-block">
                <input type="number" id="superior_money" name="superior_money"
                       autocomplete="off" class="layui-input"  value="{$info['superior_money']|default=0}">
            </div>
            <div class="layui-form-mid layui-word-aux">
                委托上限金额
            </div>
        </div>
        <div class="layui-form-item">
            <label for="start_time" class="layui-form-label">
                开始时间
            </label>
            <div class="layui-input-block">
                <input type="text" id="start_time" name="start_time"
                       autocomplete="off" class="layui-input"  value="{$info['start_time']|default='9:00'}">
            </div>
            <div class="layui-form-mid layui-word-aux">
                开始时间
            </div>
        </div>
        <div class="layui-form-item">
            <label for="cycle" class="layui-form-label">
                众筹(天数)
            </label>
            <div class="layui-input-block">
                <input type="number" id="cycle" name="cycle"
                       autocomplete="off" class="layui-input"  value="{$info['cycle']|default=0}">
            </div>
            <div class="layui-form-mid layui-word-aux">
                众筹(天数)
            </div>
        </div>
        <div class="layui-form-item">
            <label for="start_time" class="layui-form-label">
                游戏周期天数
            </label>
            <div class="layui-input-block">
                <input type="number" id="start_game_time" name="start_game_time"
                       autocomplete="off" class="layui-input"  value="{$info['start_game_time']|default=0}">
            </div>
            <div class="layui-form-mid layui-word-aux">
                游戏周期天数
            </div>
        </div>
        <div class="layui-form-item">
            <label for="start_time" class="layui-form-label">
                接单时间(分钟)
            </label>
            <div class="layui-input-block">
                <input type="number" id="receipt_minute" name="receipt_minute"
                       autocomplete="off" class="layui-input"  value="{$info['receipt_minute']|default=30}">
            </div>
            <div class="layui-form-mid layui-word-aux">
                接单时间(分钟)
            </div>
        </div>
        <div class="box-footer">
            <input type="hidden" name="type" value="{$param['type']}"/>
            <input type="hidden" name="id" value="{$info['id']|default='0'}"/>

            {include file="layout/edit_btn_group"/}

        </div>

    </form>
</div>

<script>
    layui.use('form', function(){
        var form = layui.form;

        form.on('select(aihao)', function(data){
            console.log(data.elem); //得到select原始DOM对象
            console.log(data.value); //得到被选中的值
            console.log(data.othis); //得到美化后的DOM对象
            if(data.value==1){
                $('#video_url').hide();
                $('#video').show();
            }else{
                $('#video_url').show();
                $('#video').hide();
            }

            form.render(null, 'form');
        });


    });


    function changevideo(v) {
        if(v==1){
            $('#video').show();
            $('#video_url').hide();
        }else{
            $('#video_url').show();
            $('#video').hide();
        }
    }
</script>
